<template>
  <div class="search-list hui">
  	<ul>
  		<li @click="selectItem(item)" class="search-item flex middle" v-for="item in searches">
  			<span class="text cell-main l">{{item}}</span>
  			<i class="iconfont icon-close2 l" @click.stop="close(item)"></i>
  		</li>
  	</ul>
  </div>
</template>

<script type="text/ecmascript-6">
export default{
  name:'',
  props:{
  	searches:{
  		type:Array,
  		default:[]
  	}
  },
  methods:{
		// 选择
  	selectItem(item){
  		this.$emit('select',item)
		},
		// 删除
  	close(item){
  		this.$emit('delete',item)
  	}
  },
  data(){
   return{

  }
},
  components:{}
}
</script>

<style rel="stylesheet" lang="less">
    .search-item{
    	height: 40px;
    }
</style>
